Skip to content

Reactive2DList class

Attributes: [DefaultMember("Item")] [DebuggerDisplay("Rows = {Count}")]

Defined in

Namespace: ReactiveList.Reactive.Collections Assembly: ReactiveList.Reactive.dll Full name: ReactiveList.Reactive.Collections.Reactive2DList<T> Modifiers: public sealed

Summary

View source (opens in a new tab)

Represents a two-dimensional reactive list, where each element is itself a reactive list of items of type T. Provides methods for managing and observing changes to a collection of collections in a reactive manner.

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

Class hierarchy
classDiagram
class Reactive2DList~T~
class IReactiveList~ReactiveList~T~~ {
    <>
}
IReactiveList~ReactiveList~T~~ <|.. Reactive2DList~T~
class IList~ReactiveList~T~~ {
    <>
}
IList~ReactiveList~T~~ <|.. Reactive2DList~T~
class ICollection~ReactiveList~T~~ {
    <>
}
ICollection~ReactiveList~T~~ <|.. Reactive2DList~T~
class IEnumerable~ReactiveList~T~~ {
    <>
}
IEnumerable~ReactiveList~T~~ <|.. Reactive2DList~T~
class IEnumerable {
    <>
}
IEnumerable <|.. Reactive2DList~T~
class IList {
    <>
}
IList <|.. Reactive2DList~T~
class ICollection {
    <>
}
ICollection <|.. Reactive2DList~T~
class IReadOnlyList~ReactiveList~T~~ {
    <>
}
IReadOnlyList~ReactiveList~T~~ <|.. Reactive2DList~T~
class IReadOnlyCollection~ReactiveList~T~~ {
    <>
}
IReadOnlyCollection~ReactiveList~T~~ <|.. Reactive2DList~T~
class IReactiveSource~ReactiveList~T~~ {
    <>
}
IReactiveSource~ReactiveList~T~~ <|.. Reactive2DList~T~
class INotifyCollectionChanged {
    <>
}
INotifyCollectionChanged <|.. Reactive2DList~T~
class IDisposable {
    <>
}
IDisposable <|.. Reactive2DList~T~
class INotifyPropertyChanged {
    <>
}
INotifyPropertyChanged <|.. Reactive2DList~T~
class IReactiveSourceWithOptions {
    <>
}
IReactiveSourceWithOptions <|.. Reactive2DList~T~
class IVersionedSnapshotSource~ReactiveList~T~~ {
    <>
}
IVersionedSnapshotSource~ReactiveList~T~~ <|.. Reactive2DList~T~

Implements: IReactiveList>, IList> (opens in a new tab), ICollection> (opens in a new tab), IEnumerable> (opens in a new tab), IEnumerable (opens in a new tab), IList (opens in a new tab), ICollection (opens in a new tab), IReadOnlyList> (opens in a new tab), IReadOnlyCollection> (opens in a new tab), IReactiveSource>, INotifyCollectionChanged (opens in a new tab), IDisposable (opens in a new tab), INotifyPropertyChanged (opens in a new tab), IReactiveSourceWithOptions, IVersionedSnapshotSource>

Remarks

The outer list is a ReactiveList of rows that this type holds and forwards to, so it behaves like that list for every outer operation, including the versioned snapshot and stream that views use to start without missing a change. Disposing it also disposes every row it holds at that moment. Views read Options from this list.

Constructors

NameSummary
.ctorInitializes a new instance of the Reactive2DList class.

Properties

NameSummary
AddedGets the added during the last change as an Observable.
ChangedGets the changed during the last change as an Observable.
CountGets the number of elements contained in the list.
CurrentItemsGets the current items as an observable that replays the latest snapshot to new subscribers.
IsDisposedGets a value indicating whether the source has been disposed.
IsFixedSizeGets a value indicating whether the IList (opens in a new tab) has a fixed size.
IsReadOnlyGets a value indicating whether the list is read-only.
IsSynchronizedGets a value indicating whether access to the ICollection (opens in a new tab) is synchronized (thread safe).
OptionsGets the options that apply for the lifetime of the source.
ItemsGets a read-only observable mirror of the items.
ItemsAddedGets the items added during the last change.
ItemsChangedGets the items changed during the last change.
ItemsRemovedGets the items removed during the last change.
RemovedGets the removed items during the last change as an Observable.
StreamGets an observable sequence that emits cache change notifications as they occur.
SyncRootGets an object that can be used to synchronize access to the ICollection (opens in a new tab).
VersionGets the current version number of the collection, which is incremented on each modification.
VersionedStreamGets an observable of change notifications, each paired with the version the change produced.
this[]Gets or sets the element at the specified index.

Methods

NameSummary
AddAdds an item to the ICollection (opens in a new tab).
AddRangeAdds the range.
AddToInnerAdds the specified items to the inner collection at the given outer index.
AsMemoryGets a read-only memory region over a snapshot of the items.
AsSpanGets a read-only span over a snapshot of the items.
ClearRemoves all items from the ICollection (opens in a new tab).
ClearWithoutDeallocationClears all items from the list; the internal array capacity is kept for reuse.
ClearInnerRemoves all elements from the inner collection at the specified outer index.
ContainsDetermines whether the ICollection (opens in a new tab) contains a specific value.
CopyToCopies the items to the specified span.
CopyVersionedCopies every item and reports the version of that copy.
DeferNotificationsDefers notifications about changes to the rows, not changes inside each row.
DisposeDisposes every row and then the outer list; calling it more than once, or from several threads, is safe.
EditExecutes a batch edit operation on the list.
FlattenReturns a flattened sequence containing all items from each inner collection in the order they appear.
GetEnumeratorReturns an enumerator that iterates through the list.
GetItemRetrieves the element at the specified inner index within the list located at the specified outer index.
IndexOfDetermines the index of a specific item in the IList (opens in a new tab).
InsertInserts an item to the IList (opens in a new tab) at the specified index.
InsertRangeInserts the range.
MoveMoves an item from one index to another.
RemoveRemoves the first occurrence of a specific object from the ICollection (opens in a new tab).
RemoveAtRemoves the IList (opens in a new tab) item at the specified index.
RemoveFromInnerRemoves the element at the specified index from the inner collection at the given outer index.
RemoveManyRemoves all elements that match the specified predicate from the collection.
RemoveRangeRemoves the range.
ReplaceAllReplaces all existing items with new items.
SetItemSets the element at the specified inner index within the inner list at the given outer index.
SubscribeSubscribes the specified observer to the CurrentItems.
ToArrayCreates a snapshot of current items as an array.
TotalCountCalculates the total number of items contained in all inner lists.
UpdateUpdates the specified item.

Events

NameSummary
CollectionChangedOccurs when the collection changes.
PropertyChangedOccurs when a property value changes.
Inherited members